#include<p18f4550.h>
#include<delays.h>

void main (){
       TRISB=0;
    TRISD=0;ADCON1=15;
    char letra[8]={0X00,0x00,0X72,0X52,0X52,0X94,0x00,0x00};

    char var=1, row=0, col=0;

    while (1){
        var=254;
        for(col=0;col<8;col++){
            row=letra[col];
            PORTB=row;
            var=~(1<<col);
            PORTD=var;
            Delay1KTCYx(1);

 }
    }
}